﻿<%@ Page Title="Log in" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="AjaxChatWebApp.Account.Login" %>
<%@ Register Src="~/Account/OpenAuthProviders.ascx" TagPrefix="uc" TagName="OpenAuthProviders" %>

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    <hgroup class="title">
        <h1><%: Title %>.</h1>
    </hgroup>
    <p class="validation-summary-errors">
                    <asp:Literal runat="server" ID="FailureText" />
                </p>
    <section id="loginForm">
        <h2>Chat on Ajax Messenger</h2>
                
                <fieldset>
                    <legend>Log in Form</legend>
                    <ol>
                        <li>
                            <asp:Label runat="server" AssociatedControlID="tbUserName">User name</asp:Label>
                            <asp:TextBox runat="server" ID="tbUserName" ValidationGroup="local"/>
                            <br/>
                            <asp:RequiredFieldValidator runat="server" ControlToValidate="tbUserName" 
                                CssClass="field-validation-error" ErrorMessage="The user name field is required." 
                                ValidationGroup="local"/>
                        </li>
                        <li>
                            <asp:Label runat="server" AssociatedControlID="tbPassword">Password</asp:Label>
                            <asp:TextBox runat="server" ID="tbPassword" TextMode="Password" ValidationGroup="local"/>
                            <br/>
                            <asp:RequiredFieldValidator runat="server" ControlToValidate="tbPassword" 
                                CssClass="field-validation-error" ErrorMessage="The password field is required." 
                                ValidationGroup="local"/>
                        </li>
                    </ol>
                    <asp:Button runat="server" ID="tbLogin" Text="Log in" OnClick="tbLogin_Click" ValidationGroup="local"/>
                </fieldset>

        <p>
            <asp:HyperLink ID="hplReg" runat="server" NavigateUrl="Register.aspx">Register</asp:HyperLink>
            if you don't have an account.
        </p>
    </section>

    <section id="socialLoginForm">
        <h2>Use another service to log in.</h2>
        <uc:OpenAuthProviders runat="server" ID="OpenAuthLogin" />
        <h2 style="float: left">Chat on Yahoo! Messenger</h2>
        <fieldset>
                    <legend>Log in Form</legend>
                    <ol>
                        <li>
                            <asp:Label ID="Label1" runat="server" AssociatedControlID="tbYhUserName">User name</asp:Label>                            
                            <asp:TextBox runat="server" ID="tbYhUserName" ValidationGroup="yahoo"/>  
                            <br/>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbYhUserName" 
                                CssClass="field-validation-error" ErrorMessage="The user name field is required." 
                                ValidationGroup="yahoo"/>                          
                        </li>
                        <li>
                            <asp:Label ID="Label2" runat="server" AssociatedControlID="tbYhPassword">Password</asp:Label>                           
                            <asp:TextBox runat="server" ID="tbYhPassword" TextMode="Password" ValidationGroup="yahoo"/>
                            <br/>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="tbYhPassword" 
                                CssClass="field-validation-error" ErrorMessage="The password field is required." 
                                ValidationGroup="yahoo"/>                            
                        </li>
                    </ol>
                    <asp:Button runat="server" ID="btYhLogin" Text="Log in to YM" ValidationGroup="yahoo" OnClick="btYhLogin_Click"/>
                    <asp:Button runat="server" ID="btFbLogin" Text="Log in to FB" ValidationGroup="facebook" OnClick="btFbLogin_Click"/>
                </fieldset>
    </section>

</asp:Content>
